import { createApp } from 'vue'
import App from './App.vue'
import './registerServiceWorker'
import router from './router'

// 全局样式
import '@/assets/scss/index.scss'
import 'element-plus/theme-chalk/index.css'

// 引入element-icon
import ElementPlus from 'element-plus';
import * as ElementPlusIconsVue from '@element-plus/icons-vue'
import zhCnLocale from 'element-plus/es/locale/lang/zh-cn'

// 引入pinia
import piniaPluginPersistedstate from 'pinia-plugin-persistedstate'
import {createPinia} from "pinia";
const pinia =createPinia()
pinia.use(piniaPluginPersistedstate)

import Particles from "particles.vue3";

const app = createApp(App)

for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
 app.component(key, component)
}

app
 .use(Particles)
 .use(pinia)
 .use(ElementPlus, {
  locale: zhCnLocale
 })
 .use(router)
 .mount('#app')
